<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>这是首页的模板</title>
	<link rel="stylesheet" href="./tpl/css/bootstrap.min.css">
	<style type="text/css">
		.liu{
			margin-top: 100px;
		}
	</style>
</head>
<body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Project name</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <form class="navbar-form navbar-right">
            <div class="form-group">
              <input type="text" placeholder="Email" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" placeholder="Password" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">Sign in</button>
          </form>
        </div><!--/.navbar-collapse -->
      </div>
    </nav>

    <!-- Main jumbotron for a primary marketing message or call to action -->
   
    <div class="container liu">
      <!-- Example row of columns -->
      <div class="row">
      <nav aria-label="Page navigation">
        <ul class="pagination">
        <?php if ($page<>1) { ?>
          <li>
              <a href="./index.php?p=<?php echo $page-1 ?>" aria-label="Previous">
              <span aria-hidden="true">&laquo;</span>
              </a>
          </li>
        <?php } ?>
          
          <?php  for ($i=1; $i <= $pages; $i++) { ?>
             <li><a href="./index.php?p=<?php echo $i ?>"><?php echo $i ?></a></li>
          <?php } ?>
          
          <?php if ($page<>$pages) { ?>
          <li>
              <a href="./index.php?p=<?php echo $page+1 ?>" aria-label="Next">
              <span aria-hidden="true">&raquo;</span>
              </a>
          </li>
        <?php } ?>
        </ul>
      </nav>
        
        <?php foreach ($data as $k => $v) {?>
        	<div class="col-md-4">
	        	<h2><?php echo $v['username'] ?></h2>
		        <p><?php echo $v['content'] ?>(<?php echo date('Y-m-d H-i-s',$v['create_time']) ?>)</p>
		        <p><a class="btn btn-danger" href="./shanc.php?id=<?php echo $k ?>" role="button">删除</a>
		        <a class="btn btn-danger" href="./xiug.php?id=<?php echo $k ?>" role="button">修改</a></p>
	        </div>
        <?php } ?>
         
        
      </div>
		<div class="col-md-12" style="margin-top:50px">
			<form class="form-inline" action="./tij.php" method="post">
			 <div class="col-md-12">
				 <div class="form-group">
				    <label for="exampleInputName2">Name</label>
				    <input type="text" class="form-control" id="exampleInputName2" name='username'>
				 </div>
				 <button type="submit" class="btn btn-default">提交</button>
			 </div>
			 <div class="col-md-12" style="margin-top:20px">
			 	 <textarea class="form-control" rows="3" style="width:100%" name='content'></textarea>
			 </div>
			</form>
		</div>
      <hr>

      <footer>
        <p>© 2016 Company, Inc.</p>
      </footer>
    </div>
  

</body>
</html>